<?php
include("connection/connection.php");
if(isset($_POST['submit']))
{
$frm=$_POST['frmId'];
$scheme_name=$_POST['scheme_name'];
$YOC=$_POST['YOC'];
$CC=$_POST['CC'];
if($_POST['scheme_sactioned']!='Other')
		{
			$scheme_sactioned=$_POST['scheme_sactioned'];
		}
		else
		{
			$scheme_sactioned=$_POST['scheme_sactioned_other'];
		}


$qr="update tbl_dtls_q2_main set scheme_name='$scheme_name',year_comm='$YOC',capital_cost='$CC',scheme_sanction='$scheme_sactioned' where id='$frm'";
$res=mysql_query($qr);
$qryHistory="insert into tbl_new_user_history(user_id,form_id,action_id,ip_address,modify_date,user_type,user_name) values('$_POST[loginId]','$frm','106','$_SERVER[REMOTE_ADDR]',NOW(),'$_POST[userType]','$_POST[name]')";
mysql_query($qryHistory);
if($res)
{
header("location:q2.php");
}
}
?>